using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Genetic_Tetris
{
    public partial class Form2 : Form
    {
        Random rand;
        public Form2()
        {
            InitializeComponent();
             rand = new Random();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            HeuristicConstants heuristic = new HeuristicConstants();
            Evaluator myEval = new Evaluator();
            
            int randomSeed = rand.Next(10000);
            DateTime start = DateTime.Now;
            int fit = myEval.Evaluate(heuristic, randomSeed, 100000);
            DateTime end = DateTime.Now;
            TimeSpan diff = end.Subtract(start);
            label3.Text = "Seed: " + randomSeed.ToString();
            label1.Text = "Fit: "+fit.ToString();
            label2.Text = "Time: " + diff.Milliseconds;
        }
    }
}